<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
    <title>添加或编辑界面</title>
    <link rel="stylesheet" type="text/css" href="${s.base}/lib/layui/css/layui.css"/>
    <link rel="stylesheet" type="text/css" href="${s.base}/css/base/index.css"/>
    <link rel="stylesheet" type="text/css" href="${s.base}/css/base/theme/theme.css"/>
    <style>
        .wxyy-table tr td{background:#fff!important; width:auto!important;}
        .wxyy-table caption{width:calc(100% - 2px);text-align: center;height: 50px;line-height: 50px; font-weight: 600;font-size:14px;border:1px solid #e0e0e0;}
        .layui-carousel{background:#fff;}
    </style>
</head>
<body>
<div class="wrap-container clearfix">
    <div class="column-content-detail">
        <div class="layui-carousel" id="test1">
            <div carousel-item>
                <div>
                    <form class="layui-form" action="">
                        <div class="zzzs-sqb-ctn">
                            <div class="wxyy-tab-list-tit">审核</div>
                            <table class="wxyy-item-table" cellpadding="0" cellspacing="0" width="100%">
                                <tr>
                                    <td>审核结果</td>
                                    <td style="text-align:left;padding-left:15px;">
                                        <input type="radio" name="reviewState" value="2" title="同意" checked>
                                        <input type="radio" name="reviewState" value="3" title="驳回" >
                                    </td>
                                </tr>
                                <tr>
                                    <td>审核意见</td>
                                    <td><textarea placeholder="请输入审核意见" class="wxyy-tab-textarea" id="reviewCmmt" name="reviewCmmt" value="${enrollmentStuinfo.reviewCmmt}">${enrollmentStuinfo.reviewCmmt}</textarea></td>
                                </tr>
                            </table>
                            <div class="layui-input-block" style="margin-left: 0px !important;text-align: center;margin-top: 30px; margin-bottom: 50px;">
                                <button class="layui-btn layui-btn-normal wxyy-tab-btn" lay-submit="" lay-filter="submitBtn">确定</button>
                                <button type="button" id="cancel" class="layui-btn layui-btn-primary wxyy-tab-btn">取消</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="${s.base}/lib/layui/layui.js" type="text/javascript" charset="utf-8"></script>
<script src="${s.base}/js/common.js" type="text/javascript" charset="utf-8"></script>
<script>
    var releaseId='${releaseId}';
    var menuId='${parentMenuId}';
    layui.use(['jquery', 'form', 'baseutil','carousel','page', 'dialog', 'laydate', 'fileUtil', 'baseutil'], function () {
        var $ = layui.jquery,
            form = layui.form,
            baseutil = layui.baseutil,
            carousel = layui.carousel,
            page = layui.page,
            dialog = layui.dialog,
            laydate = layui.laydate,
            fileUtil = layui.fileUtil;

        carousel.render({
            elem: '#test1'
            ,width: '100%' //设置容器宽度
            ,arrow: 'always' //始终显示箭头
            ,autoplay:false
            ,height:'1100px'
            //,indicator:'none'
            //,anim: 'updown' //切换动画方式
        });
        //监听提交
        form.on('submit(submitBtn)', function (data) {
            data.field.releaseId = releaseId;
            data.field.reviewState=$(":radio[name='reviewState']:checked").val();
            data.field.reviewCmmt=$("#reviewCmmt").val();
            baseutil.post("/enrollment/enrollmentstuinfo/checkAll", data.field, function (res) {
                if(res.code=='1'){
                    dialog.msg(res.msg);
                    return false;
                }else{
                    dialog.msg(res.msg);
                    $("#save").click();
                    parent.tabRefresh(menuId);
                    parent.tabDelete('enrollmentCheckAll');
                }
            });
            return false;
        });
        $("#cancel").on("click",function () {
            parent.tabDelete('enrollmentCheckAll');
        });
        //监听轮播切换事件
        carousel.on('change(test1)', function(obj){ //test1来源于对应HTML容器的 lay-filter="test1" 属性值
            console.log(obj.index); //当前条目的索引
            console.log(obj.prevIndex); //上一个条目的索引
            console.log(obj.item); //当前条目的元素对象
        });
    });
</script>
</body>
</html>